package net.FamilyTree.controller;

import net.FamilyTree.form.RuleForm;
import net.FamilyTree.service.SystemAdminService;
import net.FamilyTree.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("")
public class SystemAdminController {

//    自动注入
    @Autowired
    private SystemAdminService systemAdminService;

    /**
     * 登录接口
     *
     * @param ruleForm 登录表单数据
     * @return ResultVo对象
     */


    @GetMapping("/login")
    public ResultVo login(RuleForm ruleForm) {
        ResultVo resultVo = this.systemAdminService.login(ruleForm);
        return resultVo;
    }
}
